<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /* 
            需求：想让一个函数在3秒以后执行
                  delay:毫秒值

            setTimeout:只能执行一次，
         */

         setTimeout(function(arg1,arg2,arg3){
             console.log("3秒后执行")
             console.log(arg1)
             console.log(arg2)
             console.log(arg3)
         },3000,1,2,3)

         function func1(){
             console.log("5秒后执行")
         }
         const timeout1 = setTimeout(func1,5000)
         console.log(timeout1)  //2         定时器的编号

         const settime3 = setTimeout(function(){
             console.log("hahah")
         },1000)
         console.log(settime3)      //3
    </script>
</body>
</html>